.courses-container {
  min-height: 100vh;
  background: #f8f9fa;
  padding-bottom: 32rpx;

  .search-bar {
      position: sticky;
      z-index: 100;
      top: 0;
      padding: 16rpx 24rpx;
      background-color: #fff;
      box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  	border-bottom: 2rpx solid #f5f5f5;
  }
  .filter-bar {
      position: sticky;
      top: 0;
      z-index: 100;
      display: flex;
      align-items: center;
      padding: 20rpx 30rpx;
      background: #fff;
  
      .filter-item {
          display: flex;
          align-items: center;
          padding: 10rpx 24rpx;
          margin-right: 20rpx;
          font-size: 26rpx;
          color: #666;
          background: #f8f8f8;
          border-radius: 26rpx;
          transition: all 0.3s;
  
          &.active {
              color: #fff;
              background: linear-gradient(90deg, #3c9cff 0%, #63b4ff 100%);
          }
  
          .sort-icon {
              margin-left: 6rpx;
              font-size: 24rpx;
          }
      }
  }
  .search-btn {
  	height: 56rpx;
  	padding: 0 24rpx;
  	background: linear-gradient(90deg, #3c9cff 0%, #63b4ff 100%);
  	border-radius: 28rpx;
  	display: flex;
  	align-items: center;
  	justify-content: center;
  	margin-left: 16rpx;
  	min-width: 100rpx; // 添加最小宽度，防止loading时抖动
  
  	text {
  		color: #fff;
  		font-size: 26rpx;
  	}
  
  	&.loading {
  		opacity: 0.8;
  		pointer-events: none; // 加载时禁止点击
  	}
  
  	&:active {
  		opacity: 0.8;
  	}
  }

  .sort-options {
    position: fixed;
    top: 120rpx;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    padding: 20rpx 30rpx;
    background: #fff;
    border-bottom: 1rpx solid #eee;

    .sort-item {
      display: flex;
      align-items: center;
      margin-right: 40rpx;
      font-size: 28rpx;
      color: #666;

      &.active {
        color: #2b9939;
        font-weight: 500;

        .iconfont {
          color: #2b9939;
        }
      }

      .iconfont {
        margin-left: 8rpx;
        font-size: 24rpx;
        color: #999;
      }
    }
  }

  .course-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(60, 156, 255, 0.1);
    margin: 16px;
    
    .cover-section {
      position: relative;
      height: 160px;
      
      .cover-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
      
      .progress-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 8px;
        background: linear-gradient(transparent, rgba(0,0,0,0.6));
        
        .progress-bar {
          height: 4px;
          background: rgba(255,255,255,0.3);
          border-radius: 2px;
          overflow: hidden;
          
          .progress-inner {
            height: 100%;
            background: #3c9cff;
            transition: width 0.3s ease;
          }
        }
        
        .progress-text {
          color: #fff;
          font-size: 12px;
          margin-top: 4px;
        }
      }
	  
	  .status-badge {
	        position: absolute;
	        top: 12px;
	        right: 12px;
	        padding: 4px 12px;
	        border-radius: 4px;
	        font-size: 12px;
	        color: #fff;
	        background: rgba(60, 156, 255, 0.9);
	        z-index: 2;
	        
	        &.unpublished {
	          background: rgba(144, 147, 153, 0.9);
	        }
	      }
    }
    
    .content-section {
      padding: 16px;
      
      .title-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        
        .course-title {
          font-size: 16px;
          font-weight: 600;
          color: #333;
          flex: 1;
        }
        
        .status-tag {
            font-size: 12px;
            padding: 2px 8px;
            border-radius: 4px;
            
            &.status-published {
              color: #3c9cff;
              border: 1px solid #3c9cff;
              background: rgba(60, 156, 255, 0.1);
            }
            
            &.status-unpublished {
              color: #909399;
              border: 1px solid #909399;
              background: rgba(144, 147, 153, 0.1);
            }
          }
          
          .unpublished-tip {
            background: #f8f9fc;
            padding: 16px;
            border-radius: 8px;
            margin-bottom: 12px;
            text-align: center;
            
            .tip-text {
              font-size: 14px;
              color: #909399;
              display: block;
              margin-bottom: 4px;
            }
            
            .expected-date {
              font-size: 12px;
              color: #c0c4cc;
            }
          }
      }
      
      .latest-study {
        background: #f8f9fc;
        padding: 12px;
        border-radius: 8px;
        margin-bottom: 12px;
        
        .chapter-info {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-bottom: 8px;
          
          .chapter-title {
            font-size: 14px;
            color: #666;
            flex: 1;
          }
          
          .continue-btn {
            font-size: 12px;
            color: #fff;
            background: #3c9cff;
            padding: 4px 12px;
            border-radius: 4px;
          }
        }
        
        .study-stats {
          display: flex;
          justify-content: space-between;
          font-size: 12px;
          color: #999;
        }
		
		.continue-btn {
		      &:active {
		        opacity: 0.8;
		      }
		      
		      &.disabled {
		        background: #909399;
		        opacity: 0.6;
		        pointer-events: none;
		      }
		    }
			
		.duration {
		  font-size: 12px;
		  color: #909399;
		  
		  &.detail {
		    font-family: monospace; // 等宽字体，适合显示时间格式
		  }
		}
      }
      
      .tags-row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        
        .tag {
          font-size: 12px;
          color: #3c9cff;
          background: rgba(60, 156, 255, 0.1);
          padding: 4px 8px;
          border-radius: 4px;
        }
      }
    }
  }

  .loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30rpx;
    color: #999;
    font-size: 26rpx;

    .uv-loading {
      margin-right: 12rpx;
    }
  }
}

.empty {
		position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
	}
